package com.cust.sky.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cust.sky.dto.DishPageQueryDTO;
import com.cust.sky.entity.Dish;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cust.sky.vo.DishVO;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

/**
 * <p>
 * 菜品 Mapper 接口
 * </p>
 *
 * @author lei
 * @since 2024-07-10
 */
public interface DishMapper extends BaseMapper<Dish> {
    /**
     * 菜品及口味分页查询
     * @param pageParam
     * @param name
     * @param categoryId
     * @param status
     * @return
     */
    Page<DishVO> pageQuery(Page<DishVO> pageParam, String name, Integer categoryId, Integer status);

    /**
     * 根据条件统计菜品数量
     * @param map
     * @return
     */
    Integer countByMap(Map map);
}
